home *** CD-ROM | disk | FTP | other *** search
/ Aminet 25 / Aminet 25 (1998)(GTI - Schatztruhe)[!][Jun 1998].iso / Aminet / dev / basic / BDGfxLib.readme < prev    next >
Encoding:
Text File  |  1998-05-05  |  3.9 KB  |  113 lines

  1. Short:    V1.5 - Library for BlitzBasic
  2. Author:   xn.baddolls@a2points.com (NUEL Xavier)
  3. Uploader: xn.baddolls@a2points.com (NUEL Xavier)
  4. Version:  V1.5
  5. Type:     dev/basic
  6. Requires: Blitz Basic 
  7. Replaces: dev/basic/BDGfxLib.lha
  8.  
  9.  ------------------
  10.  ------------------
  11.  
  12.  
  13.         What is it ?
  14.         ------------
  15.  
  16.         BDGfxLib is a library for BlitzBasic.
  17.  
  18.  
  19.         What's new ?
  20.         ------------
  21.  
  22.         Fixed a litle bug in SaveILBM. DeluxePaint couldn't
  23.         load the picture. But now, it can !!!
  24.  
  25.  
  26.         The Commands are :
  27.         ------------------
  28.  
  29.         Match.w = FindColor(Pal#,Red,Green,Blue[,Accuracy])
  30.                   ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
  31.         This command will find in the palette pal#, the
  32.         closest colour to Red,Green,Blue...
  33.  
  34.         ------------------------------------------------------
  35.  
  36.         CGrey.w = ColorGrey(Pal#,Color#)
  37.                   ~~~~~~~~~~~~~~~~~~~~~~
  38.         This command will return the Grey value
  39.         of the colour Color# in the palette Pal#
  40.  
  41.         ------------------------------------------------------
  42.  
  43.         CGrey.w = ColorToGrey(Pal#,Color#)
  44.                   ~~~~~~~~~~~~~~~~~~~~~~~~
  45.         This command will do the same as ColorGrey, but it will
  46.         set the Red,Green & Blue to the return value
  47.  
  48.         ------------------------------------------------------
  49.  
  50.         Suc.l = SaveILBM(BitMap#,Filename$,BtmHeader,ViewMode.l,Palette#)
  51.                 ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
  52.         or
  53.  
  54.         SaveILBM BitMap#,Filename$,BtmHeader,ViewMode.l,Palette#
  55.         ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
  56.  
  57.         This command will save the bitmap BitMap# with the palette Palette#,
  58.         as an IFF-ILBM file named Filename$
  59.   
  60.         I've made this command to patch the SaveBitMap and SaveScreen
  61.         commands from Blitz, wich got a BUG !!! (Sometimes, there are
  62.         a black border on the right of the saved picture !!! Why ?
  63.         Just because these commands don't want to know the real Width
  64.         of your picture, thinking the Width is always BytePerRow*8... )
  65.  
  66.         So, YOU NEED TO SET A BitMapHeader to store the correct value
  67.         of your picture !!! BitMapHeader is defined like this :
  68.  
  69.         ***** datatypes/pictureclass.h ****
  70.  
  71.           NEWTYPE.BitMapHeader
  72.            bmh_Width.w       ; BitMap Width
  73.            bmh_Height.w      ; BitMap Height
  74.            bmh_Left.w        ; MUST BE 0 !!!
  75.            bmh_Top.w         ; MUST BE 0 !!!
  76.            bmh_Depth.b       ; BitMap Depth
  77.            bmh_Masking.b     ; 0=No Mask    OR   2=We got a ColorMask
  78.            bmh_Compression.b ; 0=Not Compressed  1=Compressed
  79.            bmh_Pad.b         ; MUST BE 0 !!!
  80.            bmh_Transparent.w ; Used if bmh_Masking=2
  81.            bmh_XAspect.b     ; Aspect in Width
  82.            bmh_YAspect.b     ; Aspect in Height
  83.            bmh_PageWidth.w   ; Screen Width  ( Can be same as BitMap )
  84.            bmh_PageHeight.w  ; Screen Height ( Can be same as BitMap )
  85.           End NEWTYPE
  86.  
  87.  
  88.           Return Code from SaveILBM :
  89.  
  90.            -1 : Well done !!!
  91.             2 : Can't alloc mem
  92.             3 : Can't open the file
  93.             4 : Can't write the file
  94.  
  95.  -----------------
  96.  
  97.                                                         Xavier NUEL
  98.                                                   17.03.98, ANGERS (France)
  99.                                                    BadDolls Production (c)
  100.  
  101.  
  102.  
  103. ============================= Archive contents =============================
  104.  
  105. Original  Packed Ratio    Date     Time    Name
  106. -------- ------- ----- --------- --------  -------------
  107.    18909    4645 75.4% 18-Mar-98 00:28:40  BDGfxLib.bb
  108.     1242     197 84.1% 18-Mar-98 00:28:40  BDGfxLib.bb.xtra
  109.     3472    1181 65.9% 18-Mar-98 00:27:18  BDGfxLib.readme
  110.     1812    1114 38.5% 18-Mar-98 00:29:14 +BDGfxLib.obj
  111. -------- ------- ----- --------- --------
  112.    25435    7137 71.9% 25-Mar-98 00:55:44   4 files
  113.